package com.npave.zryhadapter.exceptions;

import com.npave.zryhadapter.response.ReturnMsg;
import org.springframework.http.HttpStatus;

public class BusinessException extends RuntimeException{
    public ReturnMsg result;
    public HttpStatus status;

    public BusinessException(){
        this.result = ReturnMsg.SYSTEM_BUSY;
        this.status = HttpStatus.INTERNAL_SERVER_ERROR;
    }

    public BusinessException(ReturnMsg error, HttpStatus status){
        this.result = error;
        this.status = status;
    }


    public BusinessException(ReturnMsg error){
        this.result = error;
        this.status = HttpStatus.OK;
    }
}
